/**
 * @Description: QuestionServiceImpl
 * @Author: Mr.Niu
 * @Date: 2022/9/20 17:22
 */
package com.zhiyou.crud.service.impl;
import com.zhiyou.crud.bean.Question;
import com.zhiyou.crud.dao.QuestionMapper;
import com.zhiyou.crud.service.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
import java.util.List;

@Service
public class QuestionServiceImpl implements QuestionService {
    @Autowired
    QuestionMapper questionMapper;
    @Override
    public List<Question> getqus() {
        Example example=new Example(Question.class);
        example.setOrderByClause("qno desc");
        return questionMapper.selectByExample(example);
    }
}
